﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ZBJF.Warranty.Model;

namespace ZBJF.Warranty.BLL
{
    public partial class InsuranceOrderImageService
    {
        public InsuranceOrderImage LoadByID(long id)
        {
            return LoadEntities(o => o.ID == id).FirstOrDefault();
        }
        public IQueryable<InsuranceOrderImage> LoadByInsuranceOrderID(long insuranceOrderId)
        {
            return LoadEntities(o => o.InsuranceOrderId == insuranceOrderId);
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="insuranceServiceProjectId">保险服务项目ID</param>
        /// <param name="serviceProjectType">服务项目类型</param>
        /// <returns></returns>
        public IQueryable<InsuranceOrderImage> LoadByInsuranceServiceProjectId(long insuranceServiceProjectId,byte serviceProjectType)
        {
            return LoadEntities(o => o.InsuranceOrderServiceProjectId == insuranceServiceProjectId && o.ServiceProjectType == serviceProjectType);
        }
    }
}
